#!usr/bin/env python  
#@time: 2018/01/22 
import chardet

res = chardet.detect(b'Hello,world!')

print(res)